package com.tjbklx1.thread.chap08.demo02;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Test {
	
	public static void main(String[] args) {
		
//		Channel channel = new Channel(3);
//		channel.startWorkers();
		ExecutorService executorService =Executors.newFixedThreadPool(5);
		new ClientThread("Alice",executorService).start(); 
		new ClientThread("Bobby",executorService).start(); 
		new ClientThread("Chris",executorService).start(); 
		try {
			Thread.sleep(2000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		executorService.shutdown();
		
	}
}
